package com.example.weather_app.music;

import android.net.Uri;

public class Song {
    private String title;
    private String artist;
    private int resourceId;
    private String duration;
    private Uri uri;
    private boolean isLocal;
    private long albumId; // 新增专辑ID字段，用于关联专辑相关信息

    // 应用内音乐构造函数
    public Song(String title, String artist, Uri uri, String duration, boolean isLocal, int resourceId, long albumId) {
        this.title = title;
        this.artist = artist;
        this.uri = uri;
        this.duration = duration;
        this.isLocal = isLocal;
        this.resourceId = resourceId;
        this.albumId = albumId;
    }

    // 本地音乐构造函数
    public Song(String title, String artist, Uri uri, String duration, boolean isLocal) {
        this.title = title;
        this.artist = artist;
        this.uri = uri;
        this.duration = duration;
        this.isLocal = isLocal;
        this.resourceId = 0; // 默认值，可根据实际情况调整
        this.albumId = 0; // 默认值，可根据实际情况调整
    }

    // 新增带专辑ID的本地音乐构造函数
    public Song(String title, String artist, Uri uri, String duration, boolean isLocal, long albumId) {
        this.title = title;
        this.artist = artist;
        this.uri = uri;
        this.duration = duration;
        this.isLocal = isLocal;
        this.resourceId = 0; // 默认值，可根据实际情况调整
        this.albumId = albumId;
    }

    public String getTitle() {
        return title;
    }

    public String getArtist() {
        return artist;
    }

    public int getResourceId() {
        return resourceId;
    }

    public String getDuration() {
        return duration;
    }

    public Uri getUri() {
        return uri;
    }

    public boolean isLocal() {
        return isLocal;
    }

    public long getAlbumId() {
        return albumId;
    }
}